home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / apple_gi.swf / scripts / DefineSprite_574 / frame_1 / DoAction.as
Text File  |  2013-04-24  |  2KB  |  96 lines

  1. function loadData(arg)
  2. {
  3.    resetField();
  4.    var _loc2_ = new LoadVars();
  5.    var _loc3_ = new LoadVars();
  6.    _loc3_.onLoad = function(s)
  7.    {
  8.       if(s)
  9.       {
  10.          if(Number(this.rsCnt == 0))
  11.          {
  12.             msg_mc.msg_txt.text = "δì░∞¥┤φä░Ω░Ç ∞ùå∞è╡δïêδïñ.";
  13.             msg_mc._visible = true;
  14.          }
  15.          else
  16.          {
  17.             rankingData = this;
  18.             setData();
  19.          }
  20.       }
  21.       else
  22.       {
  23.          msg_mc.msg_txt.text = "∞ä£δ▓ä ∞¥æδï╡∞¥┤ ∞ùå∞è╡δïêδïñ.";
  24.          msg_mc._visible = true;
  25.       }
  26.    };
  27.    if(arg == "today")
  28.    {
  29.       menu_mc.prevFrame();
  30.    }
  31.    else
  32.    {
  33.       menu_mc.nextFrame();
  34.    }
  35.    msg_mc.msg_txt.text = "δì░∞¥┤φä░ δí£δö⌐...";
  36.    msg_mc._visible = true;
  37.    _loc2_.game_id = game_id;
  38.    _loc2_.loadType = arg;
  39.    _loc2_.sendAndLoad(baseURL + sScript1,_loc3_,"post");
  40. }
  41. function sendData()
  42. {
  43.    var _loc1_ = new LoadVars();
  44.    var _loc2_ = new LoadVars();
  45.    _loc2_.onLoad = function(s)
  46.    {
  47.       if(s)
  48.       {
  49.          loadData("today");
  50.       }
  51.    };
  52.    msg_mc.msg_txt.text = "δì░∞¥┤φä░ ∞₧àδáÑ...";
  53.    msg_mc._visible = true;
  54.    _loc1_.game_id = game_id;
  55.    _loc1_.score = score;
  56.    _loc1_.sendAndLoad(baseURL + sScript2,_loc2_,"post");
  57. }
  58. function resetField()
  59. {
  60.    myRank.text = "";
  61.    myScore.text = "";
  62.    var _loc2_ = 0;
  63.    while(_loc2_ < 10)
  64.    {
  65.       this["user_id" + _loc2_].text = "";
  66.       this["score" + _loc2_].text = "";
  67.       this["date" + _loc2_].text = "";
  68.       _loc2_ = _loc2_ + 1;
  69.    }
  70. }
  71. function setData()
  72. {
  73.    msg_mc.msg_txt.text = "";
  74.    msg_mc._visible = false;
  75.    myRank.text = rankingData.myrank;
  76.    myScore.text = rankingData.myscore;
  77.    var _loc2_ = 0;
  78.    while(_loc2_ < 10)
  79.    {
  80.       if(rankingData["id" + _loc2_] != null)
  81.       {
  82.          this["user_id" + _loc2_].text = rankingData["id" + _loc2_];
  83.          this["score" + _loc2_].text = rankingData["score" + _loc2_];
  84.          this["date" + _loc2_].text = rankingData["date" + _loc2_];
  85.       }
  86.       _loc2_ = _loc2_ + 1;
  87.    }
  88. }
  89. stop();
  90. var baseURL = _parent.baseURL;
  91. var sScript1 = _parent.sScript1;
  92. var sScript2 = _parent.sScript2;
  93. var game_id = _parent.game_id;
  94. var isLogin = Number(_parent.isLogin);
  95. var rankingData = new Object();
  96.